3.324 \(\int \frac {\text {sech}^2(c+d x)}{a+b \sinh ^2(c+d x)} \, dx\)

Optimal. Leaf size=60 \[ \frac {\tanh (c+d x)}{d (a-b)}-\frac {b \tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} d (a-b)^{3/2}} \]

[Out]

-b*arctanh((a-b)^(1/2)*tanh(d*x+c)/a^(1/2))/(a-b)^(3/2)/d/a^(1/2)+tanh(d*x+c)/(a-b)/d

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 60, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3191, 388, 208} \[ \frac {\tanh (c+d x)}{d (a-b)}-\frac {b \tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} d (a-b)^{3/2}} \]

Antiderivative was successfully verified.

[In]

Int[Sech[c + d*x]^2/(a + b*Sinh[c + d*x]^2),x]

[Out]

-((b*ArcTanh[(Sqrt[a - b]*Tanh[c + d*x])/Sqrt[a]])/(Sqrt[a]*(a - b)^(3/2)*d)) + Tanh[c + d*x]/((a - b)*d)

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rule 388

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(d*x*(a + b*x^n)^(p + 1))/(b*(n*
(p + 1) + 1)), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(b*(n*(p + 1) + 1)), Int[(a + b*x^n)^p, x], x] /; FreeQ[{
a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && NeQ[n*(p + 1) + 1, 0]

Rule 3191

Int[cos[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = FreeF
actors[Tan[e + f*x], x]}, Dist[ff/f, Subst[Int[(a + (a + b)*ff^2*x^2)^p/(1 + ff^2*x^2)^(m/2 + p + 1), x], x, T
an[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[m/2] && IntegerQ[p]

Rubi steps

\begin {align*} \int \frac {\text {sech}^2(c+d x)}{a+b \sinh ^2(c+d x)} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {1-x^2}{a-(a-b) x^2} \, dx,x,\tanh (c+d x)\right )}{d}\\ &=\frac {\tanh (c+d x)}{(a-b) d}-\frac {b \operatorname {Subst}\left (\int \frac {1}{a+(-a+b) x^2} \, dx,x,\tanh (c+d x)\right )}{(a-b) d}\\ &=-\frac {b \tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} (a-b)^{3/2} d}+\frac {\tanh (c+d x)}{(a-b) d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.16, size = 60, normalized size = 1.00 \[ \frac {\tanh (c+d x)}{d (a-b)}-\frac {b \tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} d (a-b)^{3/2}} \]

Antiderivative was successfully verified.

[In]

Integrate[Sech[c + d*x]^2/(a + b*Sinh[c + d*x]^2),x]

[Out]

-((b*ArcTanh[(Sqrt[a - b]*Tanh[c + d*x])/Sqrt[a]])/(Sqrt[a]*(a - b)^(3/2)*d)) + Tanh[c + d*x]/((a - b)*d)

________________________________________________________________________________________

fricas [B]  time = 0.59, size = 709, normalized size = 11.82 \[ \left [-\frac {{\left (b \cosh \left (d x + c\right )^{2} + 2 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + b \sinh \left (d x + c\right )^{2} + b\right )} \sqrt {a^{2} - a b} \log \left (\frac {b^{2} \cosh \left (d x + c\right )^{4} + 4 \, b^{2} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + b^{2} \sinh \left (d x + c\right )^{4} + 2 \, {\left (2 \, a b - b^{2}\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, b^{2} \cosh \left (d x + c\right )^{2} + 2 \, a b - b^{2}\right )} \sinh \left (d x + c\right )^{2} + 8 \, a^{2} - 8 \, a b + b^{2} + 4 \, {\left (b^{2} \cosh \left (d x + c\right )^{3} + {\left (2 \, a b - b^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) - 4 \, {\left (b \cosh \left (d x + c\right )^{2} + 2 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + b \sinh \left (d x + c\right )^{2} + 2 \, a - b\right )} \sqrt {a^{2} - a b}}{b \cosh \left (d x + c\right )^{4} + 4 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + b \sinh \left (d x + c\right )^{4} + 2 \, {\left (2 \, a - b\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, b \cosh \left (d x + c\right )^{2} + 2 \, a - b\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left (b \cosh \left (d x + c\right )^{3} + {\left (2 \, a - b\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + b}\right ) + 4 \, a^{2} - 4 \, a b}{2 \, {\left ({\left (a^{3} - 2 \, a^{2} b + a b^{2}\right )} d \cosh \left (d x + c\right )^{2} + 2 \, {\left (a^{3} - 2 \, a^{2} b + a b^{2}\right )} d \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + {\left (a^{3} - 2 \, a^{2} b + a b^{2}\right )} d \sinh \left (d x + c\right )^{2} + {\left (a^{3} - 2 \, a^{2} b + a b^{2}\right )} d\right )}}, \frac {{\left (b \cosh \left (d x + c\right )^{2} + 2 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + b \sinh \left (d x + c\right )^{2} + b\right )} \sqrt {-a^{2} + a b} \arctan \left (-\frac {{\left (b \cosh \left (d x + c\right )^{2} + 2 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + b \sinh \left (d x + c\right )^{2} + 2 \, a - b\right )} \sqrt {-a^{2} + a b}}{2 \, {\left (a^{2} - a b\right )}}\right ) - 2 \, a^{2} + 2 \, a b}{{\left (a^{3} - 2 \, a^{2} b + a b^{2}\right )} d \cosh \left (d x + c\right )^{2} + 2 \, {\left (a^{3} - 2 \, a^{2} b + a b^{2}\right )} d \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + {\left (a^{3} - 2 \, a^{2} b + a b^{2}\right )} d \sinh \left (d x + c\right )^{2} + {\left (a^{3} - 2 \, a^{2} b + a b^{2}\right )} d}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(d*x+c)^2/(a+b*sinh(d*x+c)^2),x, algorithm="fricas")

[Out]

[-1/2*((b*cosh(d*x + c)^2 + 2*b*cosh(d*x + c)*sinh(d*x + c) + b*sinh(d*x + c)^2 + b)*sqrt(a^2 - a*b)*log((b^2*
cosh(d*x + c)^4 + 4*b^2*cosh(d*x + c)*sinh(d*x + c)^3 + b^2*sinh(d*x + c)^4 + 2*(2*a*b - b^2)*cosh(d*x + c)^2
+ 2*(3*b^2*cosh(d*x + c)^2 + 2*a*b - b^2)*sinh(d*x + c)^2 + 8*a^2 - 8*a*b + b^2 + 4*(b^2*cosh(d*x + c)^3 + (2*
a*b - b^2)*cosh(d*x + c))*sinh(d*x + c) - 4*(b*cosh(d*x + c)^2 + 2*b*cosh(d*x + c)*sinh(d*x + c) + b*sinh(d*x
+ c)^2 + 2*a - b)*sqrt(a^2 - a*b))/(b*cosh(d*x + c)^4 + 4*b*cosh(d*x + c)*sinh(d*x + c)^3 + b*sinh(d*x + c)^4
+ 2*(2*a - b)*cosh(d*x + c)^2 + 2*(3*b*cosh(d*x + c)^2 + 2*a - b)*sinh(d*x + c)^2 + 4*(b*cosh(d*x + c)^3 + (2*
a - b)*cosh(d*x + c))*sinh(d*x + c) + b)) + 4*a^2 - 4*a*b)/((a^3 - 2*a^2*b + a*b^2)*d*cosh(d*x + c)^2 + 2*(a^3
 - 2*a^2*b + a*b^2)*d*cosh(d*x + c)*sinh(d*x + c) + (a^3 - 2*a^2*b + a*b^2)*d*sinh(d*x + c)^2 + (a^3 - 2*a^2*b
 + a*b^2)*d), ((b*cosh(d*x + c)^2 + 2*b*cosh(d*x + c)*sinh(d*x + c) + b*sinh(d*x + c)^2 + b)*sqrt(-a^2 + a*b)*
arctan(-1/2*(b*cosh(d*x + c)^2 + 2*b*cosh(d*x + c)*sinh(d*x + c) + b*sinh(d*x + c)^2 + 2*a - b)*sqrt(-a^2 + a*
b)/(a^2 - a*b)) - 2*a^2 + 2*a*b)/((a^3 - 2*a^2*b + a*b^2)*d*cosh(d*x + c)^2 + 2*(a^3 - 2*a^2*b + a*b^2)*d*cosh
(d*x + c)*sinh(d*x + c) + (a^3 - 2*a^2*b + a*b^2)*d*sinh(d*x + c)^2 + (a^3 - 2*a^2*b + a*b^2)*d)]

________________________________________________________________________________________

giac [A]  time = 0.72, size = 80, normalized size = 1.33 \[ -\frac {\frac {b \arctan \left (\frac {b e^{\left (2 \, d x + 2 \, c\right )} + 2 \, a - b}{2 \, \sqrt {-a^{2} + a b}}\right )}{\sqrt {-a^{2} + a b} {\left (a - b\right )}} + \frac {2}{{\left (a - b\right )} {\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(d*x+c)^2/(a+b*sinh(d*x+c)^2),x, algorithm="giac")

[Out]

-(b*arctan(1/2*(b*e^(2*d*x + 2*c) + 2*a - b)/sqrt(-a^2 + a*b))/(sqrt(-a^2 + a*b)*(a - b)) + 2/((a - b)*(e^(2*d
*x + 2*c) + 1)))/d

________________________________________________________________________________________

maple [B]  time = 0.12, size = 335, normalized size = 5.58 \[ \frac {b \arctan \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}\right )}{d \left (a -b \right ) \sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}+\frac {b^{2} \arctan \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}\right )}{d \left (a -b \right ) \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}-\frac {b \arctanh \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right )}{d \left (a -b \right ) \sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}+\frac {b^{2} \arctanh \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right )}{d \left (a -b \right ) \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}+\frac {2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{d \left (a -b \right ) \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sech(d*x+c)^2/(a+b*sinh(d*x+c)^2),x)

[Out]

1/d*b/(a-b)/((2*(-b*(a-b))^(1/2)-a+2*b)*a)^(1/2)*arctan(a*tanh(1/2*d*x+1/2*c)/((2*(-b*(a-b))^(1/2)-a+2*b)*a)^(
1/2))+1/d*b^2/(a-b)/(-b*(a-b))^(1/2)/((2*(-b*(a-b))^(1/2)-a+2*b)*a)^(1/2)*arctan(a*tanh(1/2*d*x+1/2*c)/((2*(-b
*(a-b))^(1/2)-a+2*b)*a)^(1/2))-1/d*b/(a-b)/((2*(-b*(a-b))^(1/2)+a-2*b)*a)^(1/2)*arctanh(a*tanh(1/2*d*x+1/2*c)/
((2*(-b*(a-b))^(1/2)+a-2*b)*a)^(1/2))+1/d*b^2/(a-b)/(-b*(a-b))^(1/2)/((2*(-b*(a-b))^(1/2)+a-2*b)*a)^(1/2)*arct
anh(a*tanh(1/2*d*x+1/2*c)/((2*(-b*(a-b))^(1/2)+a-2*b)*a)^(1/2))+2/d/(a-b)*tanh(1/2*d*x+1/2*c)/(tanh(1/2*d*x+1/
2*c)^2+1)

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(d*x+c)^2/(a+b*sinh(d*x+c)^2),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(b-a>0)', see `assume?` for mor
e details)Is b-a positive or negative?

________________________________________________________________________________________

mupad [B]  time = 1.47, size = 265, normalized size = 4.42 \[ \frac {b\,\ln \left (\frac {4\,\left (2\,a\,b-b^2+8\,a^2\,{\mathrm {e}}^{2\,c+2\,d\,x}+b^2\,{\mathrm {e}}^{2\,c+2\,d\,x}-8\,a\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{a\,{\left (a-b\right )}^3}-\frac {8\,b+32\,a\,{\mathrm {e}}^{2\,c+2\,d\,x}-16\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}}{\sqrt {a}\,{\left (a-b\right )}^{5/2}}\right )}{2\,\sqrt {a}\,d\,{\left (a-b\right )}^{3/2}}-\frac {b\,\ln \left (\frac {8\,b+32\,a\,{\mathrm {e}}^{2\,c+2\,d\,x}-16\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}}{\sqrt {a}\,{\left (a-b\right )}^{5/2}}+\frac {4\,\left (2\,a\,b-b^2+8\,a^2\,{\mathrm {e}}^{2\,c+2\,d\,x}+b^2\,{\mathrm {e}}^{2\,c+2\,d\,x}-8\,a\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{a\,{\left (a-b\right )}^3}\right )}{2\,\sqrt {a}\,d\,{\left (a-b\right )}^{3/2}}-\frac {2}{\left ({\mathrm {e}}^{2\,c+2\,d\,x}+1\right )\,\left (a\,d-b\,d\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cosh(c + d*x)^2*(a + b*sinh(c + d*x)^2)),x)

[Out]

(b*log((4*(2*a*b - b^2 + 8*a^2*exp(2*c + 2*d*x) + b^2*exp(2*c + 2*d*x) - 8*a*b*exp(2*c + 2*d*x)))/(a*(a - b)^3
) - (8*b + 32*a*exp(2*c + 2*d*x) - 16*b*exp(2*c + 2*d*x))/(a^(1/2)*(a - b)^(5/2))))/(2*a^(1/2)*d*(a - b)^(3/2)
) - (b*log((8*b + 32*a*exp(2*c + 2*d*x) - 16*b*exp(2*c + 2*d*x))/(a^(1/2)*(a - b)^(5/2)) + (4*(2*a*b - b^2 + 8
*a^2*exp(2*c + 2*d*x) + b^2*exp(2*c + 2*d*x) - 8*a*b*exp(2*c + 2*d*x)))/(a*(a - b)^3)))/(2*a^(1/2)*d*(a - b)^(
3/2)) - 2/((exp(2*c + 2*d*x) + 1)*(a*d - b*d))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\operatorname {sech}^{2}{\left (c + d x \right )}}{a + b \sinh ^{2}{\left (c + d x \right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(d*x+c)**2/(a+b*sinh(d*x+c)**2),x)

[Out]

Integral(sech(c + d*x)**2/(a + b*sinh(c + d*x)**2), x)

________________________________________________________________________________________